/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package knowledgebase.model;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author eugene
 */
@Entity
@Table(name = "USER_BLOCK_ACCESS")
public class UserBlockAccess implements Serializable {
    
    @Id
    @Column(name = "USER_BLOCK_ACCESS_ID")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    
    @ManyToOne
    @JoinColumn(name = "USER_ID")
    private User user;
    
    @ManyToOne
    @JoinColumn(name = "USER_DOCUMENT_BLOCK_ACCESS_ID")
    private UserDocumentBlockAccess blockAccess;

    public UserBlockAccess() {
    }

    public UserBlockAccess(Long id, User user, UserDocumentBlockAccess blockAccess) {
        this.id = id;
        this.user = user;
        this.blockAccess = blockAccess;
    }

    public void setBlockAccess(UserDocumentBlockAccess blockAccess) {
        this.blockAccess = blockAccess;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public UserDocumentBlockAccess getBlockAccess() {
        return blockAccess;
    }

    public Long getId() {
        return id;
    }

    public User getUser() {
        return user;
    }
    
}
